public class PrimeFactors {
    public void printPrimeFactors(int n) {
        int k = 2;
        while (k <= n) {
            if (k == n) {
                System.out.println(n);
                break;
            } else if (n % k == 0) {
                System.out.print(k + "*");
                n = n / k;// 此时的a值作为下一次的a，之后分解
            } else {
                k++;
            }
        }
    }
}
